package com.example.tse.rbhttpservice.service.moments.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


/**
 * ［首页］：版块列表、达人推荐、帖子列表
［首页］版块列表：妈妈关心等［后台会维护］，只在首页显示版块，一般推荐2个版块，一个版块下显示2个活动
［首页］达人推荐：固定三条推荐的，默认最新添加的三条记录
［首页］帖子列表：同帖子列表
 * @author wliu
 * edit tse
 */
public class MomentsHomeGetModules extends RudderResponse{
    
    private String moduleId = "";
		
    
    private String name = "";
		
    
    private List<MomentsHomeGetModulesActivities> activities = new ArrayList<MomentsHomeGetModulesActivities>();
		
	
    /**
     * @return moduleId
     */	
    public String getModuleId() { 
	    return this.moduleId;
    };
	
	/**
     * @return moduleId
     */	
    public void setModuleId(String moduleId) { 
        this.moduleId = moduleId;
    };
    
    /**
     * @return name
     */	
    public String getName() { 
	    return this.name;
    };
	
	/**
     * @return name
     */	
    public void setName(String name) { 
        this.name = name;
    };
    
    /**
     * @return activities
     */	
    public List<MomentsHomeGetModulesActivities> getActivities() { 
	    return this.activities;
    };
	
	/**
     * @return activities
     */	
    public void setActivities(List<MomentsHomeGetModulesActivities> activities) { 
        this.activities = activities;
    };
    
	
        
    private static void filterFor(MomentsHomeGetModulesActivities moments) {
        if (moments.getActivityId() == null) {
            moments.setActivityId("");
        }
        if (moments.getMainPic() == null) {
            moments.setMainPic("");
        }
        if (moments.getJoinNum() == null) {
            moments.setJoinNum("");
        }
    }
        
    public static void filter(MomentsHomeGetModules moments) {
        if (moments.getModuleId() == null) {
            moments.setModuleId("");
        }
        if (moments.getName() == null) {
            moments.setName("");
        }
        if (moments.getActivities() == null) {
            moments.setActivities(new ArrayList<MomentsHomeGetModulesActivities>());
        } else {
            for (MomentsHomeGetModulesActivities item : moments.getActivities()) {
                filterFor(item);
            }
        }
    }
}
